﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 桥接模式
{
    //抽象概念中的遥控器，扮演抽象化角色
    class AbRemoteControl
    {
        private TV _implementor;

        public TV implementor
        {
            get { return _implementor; }
            set { _implementor = value; }
        }

        /// <summary>
        ///  开电视机，这里抽象类中不再提供实现了，而是调用实现类中的实现
        /// </summary>
        public virtual void On()
        {
            _implementor.On();
        } 

        /// <summary>
        /// 关闭电视
        /// </summary>
        public virtual void Off()
        {
            _implementor.Off();
        }

        /// <summary>
        /// 更换频道
        /// </summary>
        public virtual void SetChannel()
        {
            _implementor.TuneChannel();
        }
    }
}
